package com.weitu.emergency.controller;


import com.weitu.base.controller.BaseController;
import com.weitu.emergency.entity.RehearsalUser;
import com.weitu.emergency.service.RehearsalUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author zhangqingxi 2017-05-02
 */
@Controller
@RequestMapping("emergency/rehearsalUser")
public class RehearsalUserController extends BaseController {

    private static final String MODULE_BATH_PATH = BASE_JSP_PATH + "emergency/rehearsalUser";

    private final RehearsalUserService rehearsalUserService;

    @Autowired
    public RehearsalUserController(RehearsalUserService rehearsalUserService) {
        this.rehearsalUserService = rehearsalUserService;
    }

    /**
     * 根据主键查询
     *
     * @param rehearsalPlanId
     * @return
     */
    @ResponseBody
    @RequestMapping("/findByRehearsalPlanId")
    public List<RehearsalUser> findByRehearsalPlanId(String rehearsalPlanId) {
        return rehearsalUserService.findByRehearsalPlanId(rehearsalPlanId);
    }


}
